<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>
<%@ page import="kr.hyosang.dkbs.kiosk.server.data.News" %>
<%@ page import="kr.hyosang.dkbs.kiosk.server.data.entity.NewsEntity" %>
<%@ include file="/WEB-INF/include/props.jsp" %> 
<jsp:include page="/WEB-INF/include/top.jsp" flush="false" />
<jsp:include page="/WEB-INF/include/sidebar.jsp" flush="false" />
        
        
<%
  News news = new News();
  List<NewsEntity> list = news.getCurrentList();
  
%>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">

          <h2 class="sub-header">News</h2>
          <div class="table-responsive">
            <table class="table table-striped">
              <thead>
                <tr>
                  <th>#</th>
                  <th>Title</th>
                  <th>Content</th>
                  <th>St.</th>
                  <th>Ed.</th>
                </tr>
              </thead>
              <tbody>
<%
  for(NewsEntity item : list) {
%>
                <tr>
                  <td><%=item.idName%></td>
                  <td><%=item.title%></td>
                  <td><%=item.content%></td>
                  <td><%=item.startDate%></td>
                  <td><%=item.endDate%></td>
                </tr>
<%
  }
%>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>

<jsp:include page="/WEB-INF/include/bottom.jsp" flush="false" />
    